package com.hdphone.zljutils.impl;

import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;

import com.hdphone.zljutils.inter.IViewUtil;

/**
 * @date: 2021/6/2
 * @email： yzandlj@163.com
 * @author： yangzhi
 * @describe:
 */
public class ViewUtilImpl implements IViewUtil {

    @Override
    public void setViewWidthAndHeight(@Nullable View view, int width, int height) {
        if (view == null) {
            return;
        }
        ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
        layoutParams.width = width;
        layoutParams.height = height;
        view.setLayoutParams(layoutParams);
    }
}
